//
//  shenqingtixianViewController.m
//  个人信息
//
//  Created by IOSchengxuyuan on 15/11/30.
//  Copyright © 2015年 com.ppfur. All rights reserved.
//

#import "shenqingtixianViewController.h"

@interface shenqingtixianViewController (){
    float aa,bb;
    float width,height;
    UITableViewCell*cell;
    UITextField*tt1;
    UITextField*tt2;
    UITextField*tt3;
    UITextField*tt4;
    UITextField*tt5;
    UITextField*tt6;
}

@end

@implementation shenqingtixianViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    _mytable.delegate=self;
    _mytable.dataSource=self;
    tt1.delegate=self;
    tt2.delegate=self;
    tt3.delegate=self;
    tt4.delegate=self;
    tt5.delegate=self;
    tt6.delegate=self;
    width=[UIScreen mainScreen].bounds.size.width;
    height=[UIScreen mainScreen].bounds.size.height;
    aa=width/320;
    bb=height/568;
    _mytable.frame=CGRectMake(0, 0, width, height-200);
    _mytable.scrollEnabled=NO;
    _bb1.frame=CGRectMake(40*aa, 370*bb, 95*aa, 35*bb);
    _bb2.frame=CGRectMake(185*aa, 370*bb, 95*aa, 35*bb);
    [_bb1.layer setBorderWidth:1.0f];
    [_bb1.layer setBorderColor:[[UIColor colorWithRed:28.0/255 green:184.0/255 blue:73.0/255 alpha:1] CGColor]];
    _bb2.backgroundColor=[UIColor colorWithRed:234.0/255 green:31.0/255 blue:75.0/255 alpha:1] ;
    [_bb1.layer setCornerRadius:5.0f];
    [_bb2.layer setCornerRadius:5.0f];
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(keyBoardjide:)];
    tap.cancelsTouchesInView = NO;
    [self.view addGestureRecognizer:tap];
    
   
    // Do any additional setup after loading the view.
}
- (void)keyBoardjide:(UITapGestureRecognizer *)tap
{
    [tt1 resignFirstResponder];
    [tt2 resignFirstResponder];
    [tt3 resignFirstResponder];
    [tt4 resignFirstResponder];
    [tt5 resignFirstResponder];
    [tt6 resignFirstResponder];
    
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 7;
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 40;
}
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
    return 2;
}
//-(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
//    if (![tt1 isExclusiveTouch]) {
//        [tt1 resignFirstResponder];
//    }
//}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    static NSString *id=@"row";
    cell=[tableView dequeueReusableCellWithIdentifier:id];
    if (cell==nil)
    {
        cell=[[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:id];
    }
    NSArray *row1=[cell.contentView subviews];
    //    cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    for (UIView *vv2 in row1)
    {
        [vv2 removeFromSuperview];
    }
    
    if(width==375){
        if (indexPath.row==0) {
            UILabel*ll1=[[UILabel alloc] initWithFrame:CGRectMake(15, 15, 100, 20)];
            ll1.font=[UIFont systemFontOfSize:14.0f];
            ll1.text=@"账户明细";
            [cell.contentView addSubview:ll1];
            UILabel*ll2=[[UILabel alloc] initWithFrame:CGRectMake(100, 15, 100, 20)];
            ll2.font=[UIFont systemFontOfSize:14.0f];
            ll2.text=@"提现记录";
            [cell.contentView addSubview:ll2];
            UIView*vv1=[[UIView alloc] initWithFrame:CGRectMake(87, 15, 1, 20)];
            vv1.backgroundColor=[UIColor blackColor];
            [cell.contentView addSubview:vv1];
        }else if(indexPath.row==1){
            UILabel*ll1=[[UILabel alloc] initWithFrame:CGRectMake(15, 15, 100, 20)];
            ll1.font=[UIFont systemFontOfSize:15.0f];
            ll1.text=@"提现金额";
            [cell.contentView addSubview:ll1];
            tt1=[[UITextField alloc] initWithFrame:CGRectMake(100, 8, width-100, 35)];
            tt1.placeholder=@"提现金额";
            tt1.font=[UIFont systemFontOfSize:14.0f];
            [tt1 resignFirstResponder];
            [cell.contentView addSubview:tt1];
        }else if (indexPath.row==2){
            UILabel*ll1=[[UILabel alloc] initWithFrame:CGRectMake(15, 15, 100, 20)];
            ll1.font=[UIFont systemFontOfSize:15.0f];
            ll1.text=@"真实姓名";
            [cell.contentView addSubview:ll1];
            tt2=[[UITextField alloc] initWithFrame:CGRectMake(100, 8, width-100, 35)];
            tt2.placeholder=@"如：张三";
            tt2.font=[UIFont systemFontOfSize:14.0f];
            [cell.contentView addSubview:tt2];

        }else if (indexPath.row==3){
            UILabel*ll1=[[UILabel alloc] initWithFrame:CGRectMake(15, 15, 100, 20)];
            ll1.font=[UIFont systemFontOfSize:15.0f];
            ll1.text=@"开  户  行";
            [cell.contentView addSubview:ll1];
            tt3=[[UITextField alloc] initWithFrame:CGRectMake(100, 8, width-100, 35)];
            tt3.placeholder=@"输入提现的银行名称";
            tt3.font=[UIFont systemFontOfSize:14.0f];
            [cell.contentView addSubview:tt3];
            
        }else if (indexPath.row==4){
            UILabel*ll1=[[UILabel alloc] initWithFrame:CGRectMake(15, 15, 100, 20)];
            ll1.font=[UIFont systemFontOfSize:15.0f];
            ll1.text=@"银行卡号";
            [cell.contentView addSubview:ll1];
            tt4=[[UITextField alloc] initWithFrame:CGRectMake(100, 8, width-100, 35)];
            tt4.placeholder=@"输入提现的银行卡号";
            tt4.font=[UIFont systemFontOfSize:14.0f];
            [cell.contentView addSubview:tt4];
            
        }else if (indexPath.row==5){
            UILabel*ll1=[[UILabel alloc] initWithFrame:CGRectMake(15, 15, 100, 20)];
            ll1.font=[UIFont systemFontOfSize:15.0f];
            ll1.text=@"手  机  号";
            [cell.contentView addSubview:ll1];
            tt5=[[UITextField alloc] initWithFrame:CGRectMake(100, 8, width-100, 35)];
            tt5.placeholder=@"输入手机号";
            tt5.font=[UIFont systemFontOfSize:14.0f];
            [cell.contentView addSubview:tt5];
            
        }else{
            UILabel*ll1=[[UILabel alloc] initWithFrame:CGRectMake(15, 15, 100, 20)];
            ll1.font=[UIFont systemFontOfSize:15.0f];
            ll1.text=@"备       注";
            [cell.contentView addSubview:ll1];
            tt6=[[UITextField alloc] initWithFrame:CGRectMake(100, 8, width-100, 35)];
            tt6.placeholder=@"会员备注";
            tt6.font=[UIFont systemFontOfSize:14.0f];
            [cell.contentView addSubview:tt6];

        }
    }else if(width==320){
        if (indexPath.row==0) {
            UILabel*ll1=[[UILabel alloc] initWithFrame:CGRectMake(15, 15, 100, 20)];
            ll1.font=[UIFont systemFontOfSize:14.0f];
            ll1.text=@"账户明细";
            [cell.contentView addSubview:ll1];
            UILabel*ll2=[[UILabel alloc] initWithFrame:CGRectMake(100, 15, 100, 20)];
            ll2.font=[UIFont systemFontOfSize:14.0f];
            ll2.text=@"提现记录";
            [cell.contentView addSubview:ll2];
            UIView*vv1=[[UIView alloc] initWithFrame:CGRectMake(87, 15, 1, 20)];
            vv1.backgroundColor=[UIColor blackColor];
            [cell.contentView addSubview:vv1];
        }else if(indexPath.row==1){
            UILabel*ll1=[[UILabel alloc] initWithFrame:CGRectMake(15, 15, 100, 20)];
            ll1.font=[UIFont systemFontOfSize:15.0f];
            ll1.text=@"提现金额";
            [cell.contentView addSubview:ll1];
            tt1=[[UITextField alloc] initWithFrame:CGRectMake(100, 8, width-100, 35)];
            tt1.placeholder=@"提现金额";
            tt1.font=[UIFont systemFontOfSize:14.0f];
            [cell.contentView addSubview:tt1];
        }else if (indexPath.row==2){
            UILabel*ll1=[[UILabel alloc] initWithFrame:CGRectMake(15, 15, 100, 20)];
            ll1.font=[UIFont systemFontOfSize:15.0f];
            ll1.text=@"真实姓名";
            [cell.contentView addSubview:ll1];
            tt2=[[UITextField alloc] initWithFrame:CGRectMake(100, 8, width-100, 35)];
            tt2.placeholder=@"如：张三";
            tt2.font=[UIFont systemFontOfSize:14.0f];
            [cell.contentView addSubview:tt2];
            
        }else if (indexPath.row==3){
            UILabel*ll1=[[UILabel alloc] initWithFrame:CGRectMake(15, 15, 100, 20)];
            ll1.font=[UIFont systemFontOfSize:15.0f];
            ll1.text=@"开 户 行";
            [cell.contentView addSubview:ll1];
            tt3=[[UITextField alloc] initWithFrame:CGRectMake(100, 8, width-100, 35)];
            tt3.placeholder=@"输入提现的银行名称";
            tt3.font=[UIFont systemFontOfSize:14.0f];
            [cell.contentView addSubview:tt3];
            
        }else if (indexPath.row==4){
            UILabel*ll1=[[UILabel alloc] initWithFrame:CGRectMake(15, 15, 100, 20)];
            ll1.font=[UIFont systemFontOfSize:15.0f];
            ll1.text=@"银行卡号";
            [cell.contentView addSubview:ll1];
            tt4=[[UITextField alloc] initWithFrame:CGRectMake(100, 8, width-100, 35)];
            tt4.placeholder=@"输入提现的银行卡号";
            tt4.font=[UIFont systemFontOfSize:14.0f];
            [cell.contentView addSubview:tt4];
            
        }else if (indexPath.row==5){
            UILabel*ll1=[[UILabel alloc] initWithFrame:CGRectMake(15, 15, 100, 20)];
            ll1.font=[UIFont systemFontOfSize:15.0f];
            ll1.text=@"手 机 号";
            [cell.contentView addSubview:ll1];
            tt5=[[UITextField alloc] initWithFrame:CGRectMake(100, 8, width-100, 35)];
            tt5.placeholder=@"输入手机号";
            tt5.font=[UIFont systemFontOfSize:14.0f];
            [cell.contentView addSubview:tt5];
            
        }else{
            UILabel*ll1=[[UILabel alloc] initWithFrame:CGRectMake(15, 15, 100, 20)];
            ll1.font=[UIFont systemFontOfSize:15.0f];
            ll1.text=@"备    注";
            [cell.contentView addSubview:ll1];
            tt6=[[UITextField alloc] initWithFrame:CGRectMake(100, 8, width-100, 35)];
            tt6.placeholder=@"会员备注";
            tt6.font=[UIFont systemFontOfSize:14.0f];
            [cell.contentView addSubview:tt6];
        }

        
    }else{
        if (indexPath.row==0) {
            UILabel*ll1=[[UILabel alloc] initWithFrame:CGRectMake(15, 15, 100, 20)];
            ll1.font=[UIFont systemFontOfSize:14.0f];
            ll1.text=@"账户明细";
            [cell.contentView addSubview:ll1];
            UILabel*ll2=[[UILabel alloc] initWithFrame:CGRectMake(100, 15, 100, 20)];
            ll2.font=[UIFont systemFontOfSize:14.0f];
            ll2.text=@"提现记录";
            [cell.contentView addSubview:ll2];
            UIView*vv1=[[UIView alloc] initWithFrame:CGRectMake(87, 15, 1, 20)];
            vv1.backgroundColor=[UIColor blackColor];
            [cell.contentView addSubview:vv1];
        }else if(indexPath.row==1){
            UILabel*ll1=[[UILabel alloc] initWithFrame:CGRectMake(15, 15, 100, 20)];
            ll1.font=[UIFont systemFontOfSize:15.0f];
            ll1.text=@"提现金额";
            [cell.contentView addSubview:ll1];
            tt1=[[UITextField alloc] initWithFrame:CGRectMake(100, 8, width-100, 35)];
            tt1.delegate=self;
            tt1.placeholder=@"提现金额";
            tt1.font=[UIFont systemFontOfSize:14.0f];
            [cell.contentView addSubview:tt1];
        }else if (indexPath.row==2){
            UILabel*ll1=[[UILabel alloc] initWithFrame:CGRectMake(15, 15, 100, 20)];
            ll1.font=[UIFont systemFontOfSize:15.0f];
            ll1.text=@"真实姓名";
            [cell.contentView addSubview:ll1];
           tt2=[[UITextField alloc] initWithFrame:CGRectMake(100, 8, width-100, 35)];
            tt2.delegate=self;
            tt2.placeholder=@"如：张三";
            tt2.font=[UIFont systemFontOfSize:14.0f];
            [cell.contentView addSubview:tt2];
            
        }else if (indexPath.row==3){
            UILabel*ll1=[[UILabel alloc] initWithFrame:CGRectMake(15, 15, 100, 20)];
            ll1.font=[UIFont systemFontOfSize:15.0f];
            ll1.text=@"开 户 行";
            [cell.contentView addSubview:ll1];
            tt3=[[UITextField alloc] initWithFrame:CGRectMake(100, 8, width-100, 35)];
            tt3.delegate=self;
            tt3.placeholder=@"输入提现的银行名称";
            tt3.font=[UIFont systemFontOfSize:14.0f];
            [cell.contentView addSubview:tt3];
            
        }else if (indexPath.row==4){
            UILabel*ll1=[[UILabel alloc] initWithFrame:CGRectMake(15, 15, 100, 20)];
            ll1.font=[UIFont systemFontOfSize:15.0f];
            ll1.text=@"银行卡号";
            [cell.contentView addSubview:ll1];
            tt4=[[UITextField alloc] initWithFrame:CGRectMake(100, 8, width-100, 35)];
            tt4.delegate=self;
            tt4.placeholder=@"输入提现的银行卡号";
            tt4.font=[UIFont systemFontOfSize:14.0f];
            [cell.contentView addSubview:tt4];
            
        }else if (indexPath.row==5){
            UILabel*ll1=[[UILabel alloc] initWithFrame:CGRectMake(15, 15, 100, 20)];
            ll1.font=[UIFont systemFontOfSize:15.0f];
            ll1.text=@"手 机 号";
            [cell.contentView addSubview:ll1];
            tt5=[[UITextField alloc] initWithFrame:CGRectMake(100, 8, width-100, 35)];
            tt5.delegate=self;
            tt5.placeholder=@"输入手机号";
            tt5.font=[UIFont systemFontOfSize:14.0f];
            [cell.contentView addSubview:tt5];
            
        }else{
            UILabel*ll1=[[UILabel alloc] initWithFrame:CGRectMake(15, 15, 100, 20)];
            ll1.font=[UIFont systemFontOfSize:15.0f];
            ll1.text=@"备    注";
            [cell.contentView addSubview:ll1];
            tt6=[[UITextField alloc] initWithFrame:CGRectMake(100, 8, width-100, 35)];
            tt6.delegate=self;
            tt6.placeholder=@"会员备注";
            tt6.font=[UIFont systemFontOfSize:14.0f];
            [cell.contentView addSubview:tt6];
            
        }
        
    }    return cell;
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    
    [tableView deselectRowAtIndexPath:indexPath animated:NO];
}

- (IBAction)shenqingtijiao:(id)sender {
}

- (IBAction)chongxintianxie:(id)sender {
}
@end
